<?php $this->load->view('_inc/header');?>
<script>
    $(document).ready(function(){
        $('#estatistica').click(function(){
            var divEditar = $('.popUp');
            $.ajax({
                url: '<?php echo base_url()?>index.php/turma/estatisticaAula/' + <?php echo $aula->id?>,
                type: 'POST',
                success: function(data){
                    divEditar.html(data);
                    abrePopUp();
                }
            });
        });
    });
</script>
<div style="float:left">
    <h1>Aula - <?php echo $aula->data?></h1>
    <h2>Tema: <?php echo $aula->tema?></h2>
</div>

<div style="float:right">
    <button id="estatistica">Ver Estatísticas</button>
    <button onClick="window.location.href='<?php echo base_url()?>turma/visualizar/<?php echo $aula->turma_id?>'">Voltar a Turma</button>
</div>

<table class="listagem">
    <tr>
        <th>Nome</th>
        <th>Curso</th>
        <th>Presença</th>
        <th>Observação</th>
    </tr>
    <?php foreach($alunos as $aluno){ ?>
    <tr>
        <td><?php echo $aluno->nome?></td>
        <td><?php echo $aluno->curso?></td>
        <td><?php echo $aluno->presenca?></td>
        <td><?php echo $aluno->observacao?></td>
    </tr>
    <?php } ?>
</table>
<?php $this->load->view('_inc/footer'); ?>